import request from '@/utils/request'
// 表格数据
export function getTicketListAPI(params) {
  return request({
    url: '/ticket',
    method: 'get',
    params
  })
}
// 获取小区
export function getTicketPlotAPI() {
  return request({
    url: '/community',
    method: 'get'
  })
}
// 头像
export function upload(data) {
  return request({
    url: '/base/upload?field=community',
    method: 'post',
    data
  })
}
// 回显
export function echoTicketAPI(id) {
  return request({
    url: '/ticket/' + id,
    method: 'get'
  })
}
// 删除
export function dellTicketAPI(id) {
  return request({
    url: '/ticket/' + id,
    method: 'DELETE'
  })
}
// 修改
export function editTicketAPI(data) {
  return request({
    url: '/ticket/' + data.id,
    method: 'put',
    data
  })
}
// 新增
export function addTicketAPI(data) {
  return request({
    url: '/ticket',
    method: 'post',
    data
  })
}

